<!-- huabei.html -->
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>花呗</title>
  <link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
</head>
<body>
  <div class="container">
    <header class="header">
      <button class="back-btn" onclick="window.history.back()">←</button>
      <h2>花呗</h2>
    </header>
    
    <div class="section">
      <div class="huabei-card">
        <div class="huabei-header">
          <h3 style="color: aliceblue;">花呗额度</h3>
          <div class="huabei-balance">¥5,000.00</div>
        </div>
        
        <div class="huabei-info">
          <div class="info-item">
            <span>可用额度</span>
            <span class="value">¥3,200.00</span>
          </div>
          <div class="info-item">
            <span>下月应还</span>
            <span class="value">¥1,250.00</span>
          </div>
          <div class="info-item">
            <span>还款日</span>
            <span class="value">每月10日</span>
          </div>
        </div>
      </div>
      
      <div class="action-buttons" style="margin-top: 20px;">
        <button onclick="repayHuabei()" style="flex: 1;">还款</button>
        <button onclick="viewBill()" style="flex: 1; margin-left: 10px;">查看账单</button>
      </div>
      
      <div class="huabei-features">
        <div class="feature-item" onclick="openInstallment()">
          <img src="{{ url_for('static', filename='img/fq.png') }}" alt="分期">
          <p>分期</p>
        </div>
        <div class="feature-item" onclick="openLimit()">
          <img src="{{ url_for('static', filename='img/edts.png') }}" alt="提额">
          <p>提额</p>
        </div>
        <div class="feature-item" onclick="openHistory()">
          <img src="{{ url_for('static', filename='img/jyjl.png') }}" alt="记录">
          <p>使用记录</p>
        </div>
      </div>
    </div>
  </div>
  
  <script>
    function repayHuabei() {
      alert('正在打开花呗还款页面...');
    }
    
    function viewBill() {
      alert('正在查看花呗账单...');
    }
    
    function openInstallment() {
      alert('打开分期页面...');
    }
    
    function openLimit() {
      alert('打开提额页面...');
    }
    
    function openHistory() {
      alert('打开使用记录...');
    }
  </script>
  
  <style>
    .huabei-card {
      background: linear-gradient(135deg, #2a317f, #373b57);
      color: white;
      border-radius: var(--radius-md);
      padding: 20px;
      margin: 20px 0;
      box-shadow: var(--shadow-md);
    }
    
    .huabei-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 15px;
    }
    
    .huabei-balance {
      font-size: 1.8em;
      font-weight: bold;
    }
    
    .huabei-info {
      display: flex;
      flex-direction: column;
    }
    
    .info-item {
      display: flex;
      justify-content: space-between;
      padding: 8px 0;
      border-top: 1px solid rgba(46, 40, 40, 0.2);
    }
    
    .info-item:first-child {
      border-top: none;
    }
    
    .huabei-features {
      display: flex;
      justify-content: space-around;
      margin-top: 20px;
    }
    
    .feature-item {
      text-align: center;
      width: 30%;
    }
    
    .feature-item img {
      width: 36px;
      height: 36px;
      margin-bottom: 8px;
    }
    
    .action-buttons {
      display: flex;
      justify-content: space-between;
    }
  </style>
</body>
</html>